#define OP_li8  0x35 /* load 8-bit unsigned integer */
#define OP_li16 0x36 /* load 16-bit unsigned integer */
#define OP_li32 0x37 /* load 32-bit unsigned integer */
#define OP_lf32 0x38 /* load single-precision float */
#define OP_lf64 0x39 /* load double-precision float */

#define OP_si8  0x3a /* store 8-bit integer */
#define OP_si16 0x3b /* store 16-bit integer */
#define OP_si32 0x3c /* store 32-bit integer */
#define OP_sf32 0x3d /* store single-precision float */
#define OP_sf64 0x3e /* store double-precision float */

#define store(val, addr, opcode) __asm(push(val), push(addr), op(opcode))
#define load(cast, addr, opcode) ((__xasm<cast>(push(addr), op(opcode))))

#define storeInt8(val, addr) store(val, addr, OP_si8)
#define storeInt16(val, addr) store(val, addr, OP_si16)
#define storeInt32(val, addr) store(val, addr, OP_si32)
#define storeFloat32(val, addr) store(val, addr, OP_sf32)
#define storeFloat64(val, addr) store(val, addr, OP_sf64)

#define loadInt8(addr) load(int, addr, OP_li8)
#define loadInt16(addr) load(int, addr, OP_li16)
#define loadInt32(addr) load(int, addr, OP_li32)
#define loadFloat32(addr) load(Number, addr, OP_lf32)
#define loadFloat64(addr) load(Number, addr, OP_lf64)

